package cn.edu.sgu.www.mhxysy.service.children_equipment;

import cn.edu.sgu.www.mhxysy.dto.children_equipment.ChildrenEquipmentDTO;
import cn.edu.sgu.www.mhxysy.entity.children_equipment.ChildrenEquipment;
import cn.edu.sgu.www.mhxysy.pager.children_equipment.ChildrenEquipmentPager;
import cn.edu.sgu.www.mhxysy.vo.children_equipment.ChildrenEquipmentVO;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author 沐雨橙风ιε
 * @version 1.0
 */
public interface ChildrenEquipmentService {

    /**
     * 穿戴子女装备
     * @param childrenId 子女ID
     * @param equipmentId 子女装备ID
     */
    void wear(String childrenId, String equipmentId);

    /**
     * 添加子女装备
     * @param chongwuEquipmentDTO 子女装备信息
     */
    @Transactional(rollbackFor = Exception.class)
    void insert(ChildrenEquipmentDTO chongwuEquipmentDTO);

    /**
     * 通过ID删除子女装备
     * @param equipmentId 子女装备ID
     */
    @Transactional(rollbackFor = Exception.class)
    void deleteById(String equipmentId);

    /**
     * 通过ID修改子女装备信息
     * @param chongwuEquipmentDTO 子女装备信息
     */
    @Transactional(rollbackFor = Exception.class)
    void updateById(ChildrenEquipmentDTO chongwuEquipmentDTO);

    /**
     * 查询全部子女装备
     * @return List<ChildrenEquipment>
     */
    List<ChildrenEquipment> selectAll();

    /**
     * 通过ID查询子女装备信息
     * @param id 子女装备ID
     * @return ChildrenEquipment
     */
    ChildrenEquipment selectById(String id);

    /**
     * 分页查询子女装备列表
     * @param pager 分页参数
     * @return Page<ChildrenEquipment>
     */
    Page<ChildrenEquipment> selectByPage(ChildrenEquipmentPager pager);

    /**
     * 查询宠物已穿戴的宠物装备
     * @param childrenId 子女ID
     * @return List<ChildrenEquipmentVO>
     */
    List<ChildrenEquipmentVO> getWeardEquipments(String childrenId);

    /**
     * 查询子女装备列表
     * @param type 子女装备类型
     * @param childrenId 子女ID
     * @return List<ChildrenEquipment>
     */
    List<ChildrenEquipment> selectList(Integer type, String childrenId);
}